﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AD.DAL;
using System.Data;
using AD.Model;

namespace AD.BLL
{
  public  class PresentChargeBLL
  {
      public static int Update(PresentChargeMod presentCharge)
      {
          return PresentChargeDAL.Update(presentCharge);
      }
      public static int Insert(PresentChargeMod presentCharge)
      {
          return PresentChargeDAL.Insert(presentCharge);
      }

      public static List<PresentChargeMod> QueryByPage(string filter, int pageSize, int index, out int maxcount)
      {
          return PresentChargeDAL.QueryByPage(filter, pageSize, index, out  maxcount);
      }
      public static int Delete(string id) {
          return PresentChargeDAL.Delete(id);
      }
      public static int Delete(int id) {
          return Delete(id.ToString());
      }
      public static PresentChargeMod QueryFrist(string filter)
      {
          return PresentChargeDAL.QueryFrist(filter);
      }

      public static List<PresentChargeMod> QueryFilterToList(string filter)
      {
          return PresentChargeDAL.QueryFilterToList(filter);
      }

      public static PresentChargeMod QueryById(string id)
      {
          List<PresentChargeMod> tmp= PresentChargeDAL.QueryFilterToList(" AutoID="+id);
          if (tmp != null && tmp.Count > 0)
              return tmp[0];
          return null;
      }

      public static DataTable QueryFilterToTable(string filter)
      {
          return PresentChargeDAL.QueryFilterToTable(filter);
      }
    }
}
